package com.jiaquyun.jcyx.entity

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import com.jiaquyun.jcyx.R
import java.io.Serializable

data class MainBean<T : Enum<*>, E>(
    @StringRes
    val name: Int = R.string.app_name,
    val badge: Int = 0,
    @DrawableRes
    val icon: Int = 0,
    val type: T,
    var data: E? = null
) : Serializable

enum class Error {
    ERROR_401
}

enum class MainType(val desc: String) {
    HOME("首页")
}

enum class AccessAction(val desc: String) {
    REGISTER("register"),
    RESETPWD("resetpwd"),
    MOBILE_LOGIN("mobilelogin"),
    CHANGE_MOBILE("changemobile")
}

enum class AuthResult(val desc: String) {
    SUCCESS("授权成功"),
    FAILURE("授权失败"),
    CANCEL("取消授权")
}

enum class PayResult(val desc: String) {
    SUCCESS("支付成功"),
    FAILURE("支付失败"),
    CANCEL("取消支付"),
    DUPLICATED("订单重复"),
    NETWORK("网络异常"),
    UNKNOWN("未知错误")
}

enum class PayType(val desc: String) {
    WX_PAY("微信支付"),
    ALI_PAY("支付宝支付")
}


enum class OrderAction(val desc: String) {
    SUCCESS("操作成功"),
    CANCEL("取消订单"),
    CONFIRM("确认收货"),
    DELETE("删除订单"),
    PAYMENT("立即支付")
}

enum class WebConfig(var desc: String) {
    UNKNOWN(""),
    HELP_CENTER("帮助中心"),
    USER_AGREE("用户协议"),
    WITHDRAW_DESCRIPTION("提现说明"),
    PRIVACY_AGREE("隐私协议"),
    MASSAGE_CHAIR("按摩椅介绍"),
    PUBLIC_CHARITY("公益慈善承诺"),
    STORE_CONTECT("门店服务介绍")
}

enum class EmptyState {
    START, NULL, FAILURE
}

enum class CartState {
    ADD
}

enum class MineType {
    ORDER_ALL, //全部订单
    ORDER_WAIT_PAY, //未付款
    ORDER_WAIT_SEND, //待发货
    ORDER_WAIT_TAKE, //待收货
    ORDER_COMPLETED, //已完成
    ORDER_REGISTER_MEMBER, //注册会员
    ORDER_SHARE_CENTER, //分享中心
    ORDER_ME_COLLECT, //我的收藏
    ORDER_TAKE_ADDRESS, //收货地址
    ORDER_HELP_CENTER, //帮助中心
    ORDER_CHANGE_PWD, //修改密码
    ORDER_SYSTEM_SETTING//系统设置
}